<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>重复执行不同代码</title>
    <script>
        for(var i = 1; i <= 100; i++){
            if(i==1){
                console.log('当前是第一次');
            }else if(i == 100){
                console.log('当前是第100次');
            }
        }
    </script>
</head>
<body>

</body>
</html>